ATLAS-5377: Remove duplicate NotificationREST endpoint from webapp - #730
Open
UmeshPatil-1 wants to merge 2 commits into
Open
ATLAS-5377: Remove duplicate NotificationREST endpoint from webapp#730UmeshPatil-1 wants to merge 2 commits into
UmeshPatil-1 wants to merge 2 commits into
Conversation
…webapp (port 21000) and require hooks to use rest-notification-webapp (port 41000/rest) only.
Contributor
|
@UmeshPatil-1 Did you check this on docker ? |
Contributor
Author
yes |
UmeshPatil-1
force-pushed
the
ATLAS-5377
branch
from
August 25, 2026 06:46
3abee88 to
4af1c26
Compare
…from webapp (expect error, not 204).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR implements ATLAS-5377: consolidate hook REST notification ingress on rest-notification-webapp and remove the duplicate endpoint from the main Atlas webapp.
Background
Previously, hooks could POST notification messages to two URLs:
POST http://<host>:21000/api/atlas/v2/notification/topic/{topicName}POST http://<host>:41000/rest/api/atlas/v2/notification/topic/{topicName}This PR removes the duplicate ingress on port 21000 and ensures hook clients target 41000/rest only.
Changes
1. Remove duplicate endpoint from main webapp
webapp/src/main/java/org/apache/atlas/web/rest/NotificationREST.java:21000/api/atlas/v2/notification/topic/{topicName}is no longer servedrest-notification-webapp(unchanged)2. RestNotification client fail-fast
notification/src/main/java/org/apache/atlas/notification/rest/RestNotification.javaatlas.rest.address(main webapp, port 21000)DEFAULT_ATLAS_URL(http://localhost:31000/)atlas.hook.rest.notification.addressis not configured when REST notification is enabled, throwsAtlasExceptionat startup with an actionable messageAtlasConfiguration.NOTIFICATION_HOOK_REST_ADDRESS.getPropertyName()instead of a hardcoded property string3. AtlasConstants
DEFAULT_REST_NOTIFICATION_ADDRESS = "http://localhost:41000/rest"for error-message guidanceDEFAULT_ATLAS_REST_ADDRESS = "http://localhost:21000"for the main metadata REST API (unchanged purpose)4. Unit tests
notification/src/test/java/org/apache/atlas/notification/RestNotificationTest.javaatlas.rest.addressconfigured)Breaking change / migration
Operators using REST hook mode must configure:
How was this patch tested?
Unit tests
mvn clean install -DskipITs=false -Dcheckstyle.skip=false -Drat.skip=true mvn -pl common install -DskipTests -Drat.skip=true mvn -pl notification test -Dtest=RestNotificationTest -Drat.skip=trueResult: Tests run: Failures: 0, Errors: 0, Skipped: 0 — BUILD SUCCESS
Manual tests (local distro)
curl -u admin:admin -X POST .../41000/rest/.../ATLAS_HOOKcurl -u admin:admin -X POST .../21000/api/.../ATLAS_HOOKNotFoundExceptioninapplication.log)curl -u admin:admin .../21000/api/atlas/v2/types/typedefscurl .../41000/rest/api/atlas/admin/statuscurl -u rangertagsync:rangertagsync -X POST .../41000/rest/.../ATLAS_HOOKReferences
UI changes
None — no UI changes in this PR.